package com.GroupSix.service;

import com.GroupSix.entity.WrongQuestionEntity;
import com.GroupSix.vo.WrongPracticVo;
import com.GroupSix.vo.WrongQuestionVo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface WrongQuestionService extends IService<WrongQuestionEntity> {

    //手动为某位学生添加错题
    boolean addWrongQuestionManually(Integer userId, Long questionId, String comment);

    //手动删除某位同学的某道错题
    boolean deleteWrongQuestion(Integer userId, Long questionId);

    //当回答错误次数+正确次数大于等于10次，且正确率大于90%时，自动删除错题
    int autoDeleteWrongQuestions();

    //更新某位同学某道提的解析
    boolean updateComment(Integer userId, Long questionId, String comment);

    //获取某位同学所有错题
    List<WrongQuestionVo> getWrongQuestionsByUserId(Integer userId, Integer qscourse);

    //获取某位同学的错题，根据排序字段和排序方向
    List<WrongQuestionVo> getWrongQuestionsSortedByField(Integer userId, String orderBy, String orderDirection,Integer qscourse);

    //输入userid、科目、题目数量从错题库中抽取题目随机生成练习
    List<WrongPracticVo> randWrongByNum(Integer userId, Integer num, Integer qscourse);
}





